Skip to content

Stored only in your browser. Get one under Tokens.

Stream live logs from a device connected over MQTT​

POST
/devices/{id}/log-sessions

Asks the device to stream the selected log sources of a revision ("current" by default).
Sources are paths relative to the revision's log directory; "" is the whole revision.
At most 10 sources and a tail of 500 lines. The session lasts 60 seconds unless renewed, 30 minutes at most.
An optional filter (plain text, at most 256 bytes of UTF-8 without control characters) keeps only the lines that contain it, case-insensitively; the device applies it and the tail counts matching lines.
Only the device owner may stream, and only while the device is connected over MQTT.
Requires the full API scope or devices.logs. At most 2 live sessions per device and 5 per user.

Authorizations​

ApiKeyAuth
Type
API Key (header: Authorization)

Parameters​

Path Parameters

id*

ID|PRN|NICK

Type
string
Required

Request Body​

application/json
JSON
{
  
"filter": "string",
  
"follow": true,
  
"rev": "string",
  
"sources": [
  
  
"string"
  
],
  
"tail": 0
}

Responses​

Created

application/json
JSON
{
  
"created_at": "string",
  
"created_by": "string",
  
"deadline": "string",
  
"device_id": "string",
  
"ended": true,
  
"ended_at": "string",
  
"expires_at": "string",
  
"filter": "string",
  
"follow": true,
  
"id": "string",
  
"reason": "string",
  
"rev": "string",
  
"sources": [
  
  
"string"
  
],
  
"tail": 0
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI